﻿using Dapper;
using Microsoft.Extensions.Configuration;
using System;
using Volo.Abp.DependencyInjection;

namespace SyncWayBill
{
    public class HelloWorldService : ITransientDependency
    {
        private ConnectionService ConnectionService;
        private readonly SyncMadanStatus syncMadanStatus;
        public HelloWorldService(ConnectionService connectionService,
            SyncMadanStatus _syncMadanStatus)
        {
            ConnectionService = connectionService;
            syncMadanStatus = _syncMadanStatus;
        }
        public void Test()
        {

            using (var conn = ConnectionService.GetConnection())
            {
                conn.Open();

                var result = SqlMapper.Query<object>(conn, "select *from YDGL_DELIVERY_NOTE where rownum=1");


            }

            Console.WriteLine(ConnectionService.GetConnection().ConnectionString);
        }
        public void TestUnloading()
        {
           // syncMadanStatus.Unloading();
        }
    }
}
